function validateForm(obj)
{
  alert("form validation start...");

  if(obj.uname.value == '') {
    alert('Please enter your name');
    obj.uname.focus();
    return false;
  }

  if(obj.uname.value.length < 6) {
    alert('Name should be 6 char long');
    obj.uname.focus();
    return false;
  }

  if(obj.hiddenGender.value=="") {
    alert('Please select Gender');
    obj.uname.focus();
    return false;
  }

  ////////////////// Checkbox Validation
  // document.getElementById('unameId').value;
var  oCheckBox = document.getElementsByName('hobbies[]');
var count = 0;
var minCheck = 2;
//alert(oCheckBox.length);
    for (var i = 0; i < oCheckBox.length; i++)
    {
      //alert(oCheckBox[i].checked);
      if(oCheckBox[i].checked == true){
        count++;
      }
    }
    if(count < minCheck){
      alert('Please check atleast '+minCheck+' Hobbies');
      return false;
    }
/////////////////////////////////////

  return true;
}

